/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=UnifrakturCook:wght@700&family=EB+Garamond:ital,wght@0,400;0,600;1,400&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Uncial+Antiqua&display=swap');

:root {
  /* Color palette inspired by dark fantasy */
  --bg-color: #1f1a19;
  --text-color: #e0d4c1;
  --text-box-color: rgba(214, 186, 155, 0.7);
  --heading-color: #f3dab4;
  --heading-title: rgba(173, 153, 108, 0.7);
  --accent-color: #7e6647;
  --card-bg: rgba(46, 41, 37, 0.692);
  --card-border: #333333;
  --card-box-border: rgba(61, 52, 46, 0.6);
  --hover-glow: rgba(172, 123, 60, 0.5);
  --link-color: #977b51;
  --link-hover: #573b18;
}

* {
  box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    background-color: black;;
}

body {
    margin: 0;
    font-family: 'EB Garamond', serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    scroll-snap-type: mandatory;
}

section {
    scroll-snap-align: start;
}

/* Header & Navigation */
header {
    background-color: #1f1a18;
    padding: 1rem 2rem;
    border-bottom: 2px solid var(--card-border);
    display: flex;
    flex-direction: column;
    align-items: center;
}

header h1 {
    font-family: 'UnifrakturCook', cursive;
    font-size: 2rem;
    color: var(--heading-color);
    margin: 0;
}

nav {
  margin-top: 0.5rem;

    ul {
        list-style: none;
        padding: 0;
        display: flex;
        gap: 1.5rem;

        li {
            position: relative;
            font-weight: 600;
            color: var(--link-color);
            cursor: pointer;
            transition: color 0.2s ease;

            &:hover {
                color: var(--link-hover);
            }
        }
    }
}

nav ul li::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--link-hover);
    transition: width 0.4s ease, left 0.4s ease;
}

nav ul li:hover::after {
    width: 100%;
    left: 0;
}

nav ul li a {
    text-decoration: none;
    color: inherit;
    font-family: "Cinzel Decorative", serif;
    font-weight: 700;
}

/* Main content */
/* Intro Section */
.novel-intro {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 400px;
    min-height: 250px;
    background-color: var(--card-bg);
    border: 1px solid var(--card-box-border);
    padding: 1rem;
    margin: 1rem 0;
}

.novel-intro h2 {
    font-family: 'UnifrakturCook', cursive;
    color: var(--heading-color);
    margin-bottom: 0.5rem;
}

.novel-intro p {
    color: var(--text-color);
    text-align: center;
    max-width: 600px;
}

/* Novel List */
.selection {
    position: relative;
    overflow: hidden;
}

.selection::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("../../Quick links/Novels/images/background-novels.png");
    opacity: 0.5;
    z-index: 0;
    background-repeat: no-repeat;
    background-size: cover; 
    filter: blur(1px);
    background-attachment: fixed;
    inset: -10px;
}

.selection > * {
    position: relative;
    z-index: 1;
}

.selection-hero {
    flex: 0 0 100px;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-left: 8rem;
    padding-right: 2rem;
}

.hero-text {
    max-width: 22%; 
    min-width: 200px;
    flex: 0 0 22%;
}

.hero-text h2 {
    font-size: 3.6rem;
    margin-bottom: 0.5rem;
    color: #fff;
    font-family: "Uncial Antiqua", system-ui;
}

.hero-text p {
    font-size: 1.7rem;
    margin-bottom: 0.2rem;
    font-family: "Josefin Slab", serif;
    font-optical-sizing: auto;
}

.hero-control {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-left: 2.9rem;
    height: 4.2rem;
}

/* Arrow Styles from Novels section*/
.hero-control .arrow {
    background: transparent;
    border: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2rem;
    color: rgba(173, 153, 108, 0.7);
}

.arrow svg {
    width: 3rem;   
    height: 3rem;  
    fill: none;
    stroke-width: 1; 
    transition: 
        filter 0.6s cubic-bezier(0.2, 0, 0.2, 1),
        box-shadow 0.6s cubic-bezier(0.2, 0, 0.2, 1),
        color 0.6s cubic-bezier(0.2, 0, 0.2, 1),
        stroke 0.6s cubic-bezier(0.2, 0, 0.2, 1),
        fill 0.6s cubic-bezier(0.2, 0, 0.2, 1),
        transform 0.3s cubic-bezier(0.5, 0, 0.2, 1);
}

.arrow svg:hover {
    transform: translateY(-2px) scale(1.08);
    background: none;
    color: inherit;
    fill: rgba(191, 167, 111, 0.8);
    stroke: rgba(22, 19, 14, 0.5);
    >polyline {fill:transparent}
}

.arrow svg:active {
    transform: translateY(1px) scale(0.98);
}

.arrow-left {
    padding-left: 4rem; 
}

.arrow-right {
    padding-right: 4rem;
}

/* Short Arrow Styles */

.hero-control .arrow-short {
    background: transparent;
    border: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2rem;
    color: rgba(173, 153, 108, 0.7);
}

.arrow-short svg {
    width: 3rem;   
    height: 3rem;  
    fill: none;
    stroke: rgba(173, 153, 108, 0.7);
    stroke-width: 1; 
    transition: 
        filter 0.6s cubic-bezier(0.2, 0, 0.2, 1),
        box-shadow 0.6s cubic-bezier(0.2, 0, 0.2, 1),
        color 0.6s cubic-bezier(0.2, 0, 0.2, 1),
        stroke 0.6s cubic-bezier(0.2, 0, 0.2, 1),
        fill 0.6s cubic-bezier(0.2, 0, 0.2, 1),
        transform 0.3s cubic-bezier(0.5, 0, 0.2, 1);
}

.arrow-short svg:hover {
    transform: translateY(-2px) scale(1.08);
    background: none;
    color: inherit;
    box-shadow: none;
    fill: rgba(191, 167, 111, 0.8);
    stroke: rgba(22, 19, 14, 0.5);
    >polyline {fill:transparent}
}

.arrow-short svg:active {
    transform: translateY(1px) scale(0.98);
}

.arrow-short-left {
    padding-left: 4rem; 
}

.arrow-short-right {
    padding-right: 4rem;
}

/* Read More Button */
.read-more {
    padding: 1.2rem 2.8rem;
    border: 1px solid rgba(173, 153, 108, 0.7);
    background: transparent;
    color: #fff;
    cursor: pointer;
    font-family: "Ysabeau Office", sans-serif;
    font-optical-sizing: auto;
    display: flex;
    align-items: center;
    justify-content: center;   
    margin-left: 5rem;
    margin-top: 3.5rem;
    color: #bfa76f;
    font-weight: 500;
    font-size: 1.2rem;
    box-shadow: inset 0 0 0 rgba(0,0,0,0.2);
    border-radius: 24px;
    transition: 
        background 0.4s ease,
        color 0.4s ease,
        box-shadow 0.4s ease,
        transform 0.2s ease;
}

.read-more:hover {
  background: linear-gradient(
    135deg, 
    rgba(191,167,111,0.8), 
    rgba(191,167,111,1)
  );
  color: #1e1b1b;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.3);
  transform: translateY(-2px);
}

.read-more:active {
  transform: translateY(1px);
}

/* Carousel */
.carousel {
    display: flex;
    width: 65%;
    overflow-x: auto;
    gap: 2.5rem;
    padding: 1rem 0;
    scroll-snap-type: x mandatory;
    position: relative;
    scroll-behavior: smooth;
    align-items: stretch;
}

.carousel::-webkit-scrollbar {
    display: none; 
}

.carousel.scrolled-left {
    -webkit-mask-image: linear-gradient(
    to right,
    rgba(0,0,0,0) 0%,
    rgba(0,0,0,1) 10%,
    rgba(0,0,0,1) 100%
  );
        mask-image: linear-gradient(
    to right,
    rgba(0,0,0,0) 0%,
    rgba(0,0,0,1) 10%,
    rgba(0,0,0,1) 100%
  );
  mask-mode: alpha;
  mask-repeat: no-repeat;
}

.carousel.scrolled-right {
    -webkit-mask-image: linear-gradient(
    to left,
    rgba(0,0,0,0) 0%,
    rgba(0,0,0,1) 10%,
    rgba(0,0,0,1) 100%
  );
        mask-image: linear-gradient(
    to left,
    rgba(0,0,0,0) 0%,
    rgba(0,0,0,1) 10%,
    rgba(0,0,0,1) 100%
  );
  mask-mode: alpha;
  mask-repeat: no-repeat;
}

/* Card Styles */
.card {
    display: flex;
    flex-direction: column;
    flex: 0 0 400px;
    scroll-snap-type: start;
    background: rgba(95, 85, 76, 0.4);
    overflow: hidden;
    text-align: center;
    box-shadow: 0 4px 8px rgb(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;  
    height: 660px;
    cursor: pointer;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.card:hover img {
    transform: scale(1.05);
    width: 100%;
}

.card img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: transform 0.3s ease;
    filter: brightness(1.2);
    transform: translate(0,-5%);
}

.image-container {
    overflow: hidden;
    height: 500px;
}

.card-text {
    padding: 1em 1em 1em;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.card h3 {
    margin: 0.5rem 0 0.5rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--heading-color);
    font-family: "IM Fell English", serif;
    text-align: left;
    padding: 0 2rem;
}

.card p {
    margin: 0 0 0.75rem; 
    color: var(--text-color);
    font-size: 1.1rem;
    font-family: "Josefin Slab", serif;
    font-optical-sizing: auto;
    text-align: left;
    padding: 0 2rem;
    display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Novels Section Specific Styles */
.selection-novels {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

/* Short story box specific styles */
.selection-short-stories {
    padding-top: 6rem;
    padding-bottom: 6rem;
    position: relative; 
}

.selection-short-stories::before {
    content: "";
    position: absolute;
    top: 0.5rem;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        to right,
        transparent 10%,
        var(--heading-title) 50%,
        transparent 90%
    );
}

